The Slider Component > FSlider (object) |
FSlider (object)
The methods of the Slider component allow you to control the component at runtime. You can define how the component looks and functions, change the value, and respond to user interactions with the component. You do not need to use a constructor to access the methods of the component.
The ActionScript extension for the Slider component is _sld.
If you append this to your component instance names, code hinting and auto-completion
will be available within the Flash authoring environment.
Component methods do not perform error checking for type, as do other native ActionScript objects and actions. Therefore, you should validate parameters before passing them to methods.
Method summary for the FSlider object
Method name |
Description |
|---|---|
Returns a Boolean value representing the enabled state of the component. |
|
Returns the current orientation of the slider component. |
|
Returns the sliders current value rounded to the nearest whole number. |
|
Returns the large step amount. The large step amount is the value of how much the thumb on the slider will move when the user holds down the CTRL key while pressing one of the arrow keys on the keyboard. It only affects keyboard navigation. |
|
Returns the maximum value of the slider. The maximum value is the value represented when the thumb control is all the way to the right (horizontal) or top (vertical) of the slider component. |
|
Returns the minimum value of the slider. The minimum value is the value represented when the thumb control is all the way to the left (horizontal) or bottom (vertical) of the slider component. |
|
Returns the small step amount. The small step amount is the value of how much the thumb on the slider will move when the user presses an arrow keys on the keyboard. It only affects keyboard navigation. |
|
Returns whether the thumb (and the data value it represents) resolves to the closest tick mark where the user positioned the thumb. The default value for this is false. |
|
Returns the symbol that is used as the thumb button for the component. |
|
| Returns the number of tick marks within the component. If snapToTick is set to false, then the tick marks will not be displayed within the component. |
|
| Returns the style being used for the tick marks. Valid values are "bottom", "top", "both", "none". |
|
| Returns the current value of the slider. |
|
| Allows you to pass in a name of a function that will be called whenever the components value changes. |
|
| Specifies whether the slider is enabled (true) or disabled (false). If a slider is disabled, it does not accept mouse or keyboard interaction from the user. This method will gray out the component. |
|
| Allows you to change the orientation of the Slider component between horizontal and vertical. It takes a Boolean value which specifies whether the component is displayed horizontally (true) or vertically (false). |
|
| Sets the large step amount. The large step amount is the value of how much the thumb on the slider will move when the user holds down the CTRL key while pressing one of the arrow keys on the keyboard. It only affects keyboard navigation. |
|
| Sets the width in pixels of the slider. |
|
| Allows you to set the range of values for the slider. If the minimum is greater than the maximum then the properties will not be changed. The minimum value is represented by the slider when the thumb control is all the way to the left (horizontal) or bottom (vertical). The maximum value is represented by the slider when the thumb control is all the way to the right (horizontal) or top (vertical). |
|
| Sets the small step amount. The large step amount is the value of how much the thumb on the slider will move when the user presses one of the arrow keys on the keyboard. It only affects keyboard navigation. |
|
| Specifies whether the thumb (and the data value it represents) resolves to the closest tick mark where the user positioned the thumb. The default value for this is false. |
|
| Specifies the symbol which should be used for the thumb control on the slider. There are three symbols included with the slider, which are fsl_squareThumb, fsl_pointerThumb and fsl_diamondThumb. You can also create your own symbols and pass in their symbol linkage id. |
|
| Sets the number of tick marks that will be displayed on the slider. The tick placement on the scale will be even. In a Slider with a minimum value of 0 and a maximum value of 50 if you setTickFrequency(6) than a tick will appear at 0,10,20,30,40,50. If frequency is not greater than or equal to 2 than frequency will be set to 2; this is because there is always an implied minimum and maximum tick mark. |
|
| Sets where or if tick marks will appear on the slider component. Valid values are "none", "top", "bottom" and "both". |
|
| Specifies the value of the slider. The value will be restricted to the maximum and minimum values.The thumb cursor for the slider will be updated to reflect the new value. If snapping is enabled the value will be snapped to the appropriate tick value. |